﻿using StudentCouncil.DAL.DAO;
using StudentCouncil.Model;
using StudentCouncil.Model.Models;
using StudentCouncil.Model.Parameter;
using System;
using System.Collections.Generic;
using System.Text;

namespace StudentCouncil.BLL.Mgr
{
   public class CouncilMgr
    {
        public static Pager<Competition> GetCompetitionListByPage(CompetitionParameter parameter)
        {
            return CounciDAO.GetListByPage(parameter);
        }
        public static Pager<Competitionstatus> GetCompetitionstatusListByPage(CompetitionstatusParameter parameter)
        {
            return CounciDAO.GetstatusListByPage(parameter);
        }
        public static bool DeleteById(int id)
        {
            return CounciDAO.DeleteById(id);
        }
        public static bool BatchDelete(string ids)
        {
            string[] array = ids.Split(',');
            return CounciDAO.BatchDelete(array);
        }
        public static bool AddCompetition(Competition entity)
        {
            return CounciDAO.AddCompetition(entity);
        }
        public static Competition GetCompetitionById(int id)
        {
            return CounciDAO.GetCompetitionById(id);
        }
        public static bool CheckCompetitionById(int id)
        {
            Competition result = CounciDAO.GetCompetitionById(id);
            return result != null;
        }
        public static bool Update(Competition entity)
        {
            return CounciDAO.Update(entity);
        }
        public static bool Updatestatus(Competitionstatus entity)
        {
            return CounciDAO.UpdateCompetitionstatus(entity);
        }
        public static bool AddCompetitionStatus(Competitionstatus entity)
        {
            return CounciDAO.AddCompetitionstatus(entity);
        }
    }
}
